<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: ipc::util::Use_counted_object Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceipc.html">ipc</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1util.html">util</a></li><li class="navelem"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html">Use_counted_object</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classipc_1_1util_1_1Use__counted__object-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">ipc::util::Use_counted_object Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Simple counter that manually tracks utilization. It is not thread-safe.  
 <a href="classipc_1_1util_1_1Use__counted__object.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="use__counted__object_8hpp_source.html">use_counted_object.hpp</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ipc::util::Use_counted_object:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1util_1_1Use__counted__object__coll__graph.svg" width="158" height="131"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a80eac60ad02738606b633bce479ddcdb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html#a80eac60ad02738606b633bce479ddcdb">Use_counted_object</a> ()</td></tr>
<tr class="memdesc:a80eac60ad02738606b633bce479ddcdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classipc_1_1util_1_1Use__counted__object.html#a80eac60ad02738606b633bce479ddcdb">More...</a><br /></td></tr>
<tr class="separator:a80eac60ad02738606b633bce479ddcdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a761e411907d25cc76b139aba3913c744"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html#a761e411907d25cc76b139aba3913c744">get_use_count</a> () const</td></tr>
<tr class="memdesc:a761e411907d25cc76b139aba3913c744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current usage.  <a href="classipc_1_1util_1_1Use__counted__object.html#a761e411907d25cc76b139aba3913c744">More...</a><br /></td></tr>
<tr class="separator:a761e411907d25cc76b139aba3913c744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d616e432356ba5198b4827a30157d28"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html#a2d616e432356ba5198b4827a30157d28">increment_use</a> ()</td></tr>
<tr class="memdesc:a2d616e432356ba5198b4827a30157d28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments the usage.  <a href="classipc_1_1util_1_1Use__counted__object.html#a2d616e432356ba5198b4827a30157d28">More...</a><br /></td></tr>
<tr class="separator:a2d616e432356ba5198b4827a30157d28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a039cb41eacbfeeab7c31d67757cc462c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html#a039cb41eacbfeeab7c31d67757cc462c">decrement_use</a> ()</td></tr>
<tr class="memdesc:a039cb41eacbfeeab7c31d67757cc462c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrements the usage. The current count must be greater than one.  <a href="classipc_1_1util_1_1Use__counted__object.html#a039cb41eacbfeeab7c31d67757cc462c">More...</a><br /></td></tr>
<tr class="separator:a039cb41eacbfeeab7c31d67757cc462c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a9321c72f51d22da1ee041f29de5e9b43"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1util_1_1Use__counted__object.html#a9321c72f51d22da1ee041f29de5e9b43">m_use_count</a></td></tr>
<tr class="memdesc:a9321c72f51d22da1ee041f29de5e9b43"><td class="mdescLeft">&#160;</td><td class="mdescRight">The current usage count.  <a href="classipc_1_1util_1_1Use__counted__object.html#a9321c72f51d22da1ee041f29de5e9b43">More...</a><br /></td></tr>
<tr class="separator:a9321c72f51d22da1ee041f29de5e9b43"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Simple counter that manually tracks utilization. It is not thread-safe. </p>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8hpp_source.html#l00027">27</a> of file <a class="el" href="use__counted__object_8hpp_source.html">use_counted_object.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a80eac60ad02738606b633bce479ddcdb" name="a80eac60ad02738606b633bce479ddcdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80eac60ad02738606b633bce479ddcdb">&#9670;&nbsp;</a></span>Use_counted_object()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ipc::util::Use_counted_object::Use_counted_object </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8cpp_source.html#l00024">24</a> of file <a class="el" href="use__counted__object_8cpp_source.html">use_counted_object.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a039cb41eacbfeeab7c31d67757cc462c" name="a039cb41eacbfeeab7c31d67757cc462c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a039cb41eacbfeeab7c31d67757cc462c">&#9670;&nbsp;</a></span>decrement_use()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipc::util::Use_counted_object::decrement_use </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrements the usage. The current count must be greater than one. </p>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8cpp_source.html#l00039">39</a> of file <a class="el" href="use__counted__object_8cpp_source.html">use_counted_object.cpp</a>.</p>

<p class="reference">References <a class="el" href="use__counted__object_8hpp_source.html#l00054">m_use_count</a>.</p>

</div>
</div>
<a id="a761e411907d25cc76b139aba3913c744" name="a761e411907d25cc76b139aba3913c744"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a761e411907d25cc76b139aba3913c744">&#9670;&nbsp;</a></span>get_use_count()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int ipc::util::Use_counted_object::get_use_count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the current usage. </p>
<dl class="section return"><dt>Returns</dt><dd>See above. </dd></dl>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8cpp_source.html#l00029">29</a> of file <a class="el" href="use__counted__object_8cpp_source.html">use_counted_object.cpp</a>.</p>

<p class="reference">References <a class="el" href="use__counted__object_8hpp_source.html#l00054">m_use_count</a>.</p>

</div>
</div>
<a id="a2d616e432356ba5198b4827a30157d28" name="a2d616e432356ba5198b4827a30157d28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d616e432356ba5198b4827a30157d28">&#9670;&nbsp;</a></span>increment_use()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipc::util::Use_counted_object::increment_use </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increments the usage. </p>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8cpp_source.html#l00034">34</a> of file <a class="el" href="use__counted__object_8cpp_source.html">use_counted_object.cpp</a>.</p>

<p class="reference">References <a class="el" href="use__counted__object_8hpp_source.html#l00054">m_use_count</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a9321c72f51d22da1ee041f29de5e9b43" name="a9321c72f51d22da1ee041f29de5e9b43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9321c72f51d22da1ee041f29de5e9b43">&#9670;&nbsp;</a></span>m_use_count</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int ipc::util::Use_counted_object::m_use_count</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The current usage count. </p>

<p class="definition">Definition at line <a class="el" href="use__counted__object_8hpp_source.html#l00054">54</a> of file <a class="el" href="use__counted__object_8hpp_source.html">use_counted_object.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="use__counted__object_8cpp_source.html#l00039">decrement_use()</a>, <a class="el" href="use__counted__object_8cpp_source.html#l00029">get_use_count()</a>, and <a class="el" href="use__counted__object_8cpp_source.html#l00034">increment_use()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>util/<a class="el" href="use__counted__object_8hpp_source.html">use_counted_object.hpp</a></li>
<li>util/<a class="el" href="use__counted__object_8cpp_source.html">use_counted_object.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 11 2025 20:02:27 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
